<include file="Public/header" />
<title></title>
</head>
<body>
<div class="page-container">
   <label class="label" style="padding:9px;">
		角色组：
   </label>
   <select name="role_list" class="role_list select" style="width:190px;padding:5px;">
	<volist name="list" id="vo">
		<option value="<{$vo.id}>"><{$vo.name}></option>
	</volist>
   </select>
   <br><br>
   <input value="<{:I('ids')}>" type="hidden" class="ids" />
   <div style="margin-bottom: 12px;" class="Huialert Huialert-info"><i class="icon-remove"></i>点击确定，角色权限将同步并覆盖到对应erp系统</div>
   <button class="btn btn-success" onclick="bind_role()">确定</button>
</div>
<include file="Public/footer_js" />
<script>
	function bind_role(){
			var ids=$('.ids').val();
			var role_id=$('.role_list').val();
			$.ajax({
				type: 'POST',
				data: {ids:ids,role_id:role_id},
				url: "<{:U('confirm_bind_role')}>",
				success:function(data){
					if(data.status==1){	//检查通过，跳转生成波次单页面
						layer.msg(data.info,function(){
							window.location.reload();
						});
						
					}else{				//检查未通过，刷新页面
						layer.msg(data.info);
					}
					return false;
				}
			})
    }
</script>
</body>
</html>